package com.gitee.poi.plugin.annotations.core;

import org.apache.poi.hssf.util.HSSFColor;
import org.apache.poi.ss.usermodel.Font;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.apache.poi.ss.usermodel.VerticalAlignment;

import java.lang.annotation.*;

/**
 * 注解列标题，并设置列标题样式
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
@Documented
public @interface Column {

    String value();

    int order() default 0;

    short fontSize() default 12;

    boolean bold() default true;

    boolean italic() default false;

    String fontName() default "宋体";

    /**
     * set type of text underlining to use
     * @see org.apache.poi.ss.usermodel.Font#U_NONE
     * @see org.apache.poi.ss.usermodel.Font#U_SINGLE
     * @see org.apache.poi.ss.usermodel.Font#U_DOUBLE
     * @see org.apache.poi.ss.usermodel.Font#U_SINGLE_ACCOUNTING
     * @see org.apache.poi.ss.usermodel.Font#U_DOUBLE_ACCOUNTING
     */
    byte underline() default Font.U_NONE;

    HSSFColor.HSSFColorPredefined color() default HSSFColor.HSSFColorPredefined.BLACK;

    boolean wrapText() default false;

    HorizontalAlignment align() default HorizontalAlignment.LEFT;

    VerticalAlignment verticalAlign() default VerticalAlignment.CENTER;
}
